﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TS_XY_Train_Repaire.ToolSystem
{
    public partial class Tool_System_ToolBoxEdit_Form : DevExpress.XtraEditors.XtraForm
    {
        public Tool_System_ToolBoxEdit_Form()
        {
            InitializeComponent();
        }

        private void Tool_System_ToolBoxEdit_Form_Load(object sender, EventArgs e)
        {
            _LoadData();
        }

        private void _LoadData()
        {
            try
            {
                gc_Main.DataSource = ToolDataMgr.GetInstance().GetToolListNobox();

                tl_box.DataSource = ToolDataMgr.GetInstance().GetToolListBoxAndTool();
            }
            catch
            {
                gc_Main.DataSource = null;
                gc_Main.Refresh();

                tl_box.DataSource = null;
                tl_box.Refresh();
            }
        }

        private void btn_addtool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

        }

        private void btn_deltool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

        }
    }
}